/*
 * Created on 2005-10-9
 *
 */
package com.hd123.rumba.user;

import com.hd123.rumba.domain.IDomain;
import com.hd123.rumba.organization.IOrganization;

/**
 * @author caili
 */
public class LoginResult {
  private boolean error = false;
  private IUser user = null;
  private IDomain domain = null;
  private IDomain enterpriseDomain = null;
  private IOrganization loginOrganization = null;
  private StringBuffer errorText = new StringBuffer();

  public LoginResult() {
    super();
  }

  public IDomain getDomain() {
    return domain;
  }

  public void setDomain(IDomain domain) {
    this.domain = domain;
  }

  public boolean isError() {
    return error;
  }

  public void setError(boolean error) {
    this.error = error;
  }

  public IUser getUser() {
    return user;
  }

  public void setUser(IUser user) {
    this.user = user;
  }

  public void addErrorText(String s) {
    setError(true);
    errorText.append(s);
  }

  public String getErrorText() {
    return errorText.toString();
  }

  public IDomain getEnterpriseDomain() {
    return enterpriseDomain;
  }

  public void setEnterpriseDomain(IDomain enterpriseDomain) {
    this.enterpriseDomain = enterpriseDomain;
  }

  public IOrganization getLoginOrganization() {
    return loginOrganization;
  }

  public void setLoginOrganization(IOrganization loginOrganization) {
    this.loginOrganization = loginOrganization;
  }
}
